#include <iostream>
#include <cstdio>
using namespace std;
int main(){
	int n;
	int a = 0;	
	scanf("%d", &n);
	if(n <= 3)
		a = 8;
	else
		a = 8.0 + ((n - 3) * 2);
	printf("%d\n", a);
	return 0;
}
